package com.ha.garbage.context;

public class BaseContext {

    public static  ThreadLocal<String> threadLocal3 = new ThreadLocal<>();
    public static void setCurrentToken(String token){
        threadLocal3.set(token);
    }
    public static String getCurrentToken(){
        return threadLocal3.get();
    }
    public void removeCurrentToken(){
        threadLocal3.remove();
    }

    public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();
    public static ThreadLocal<Integer> threadLocal2 = new ThreadLocal<>();
    public static ThreadLocal<String> threadLocal1 = new ThreadLocal<>();
    public static void setCurrentCreditPoint(Integer creditPoint) {
        threadLocal2.set(creditPoint);
    }
    public static void removeCurrentCreditPoint() {
        threadLocal2.remove();
    }
    public static Integer getCurrentCreditPoint() {
        return threadLocal2.get();
    }

    public static void setCurrentId(Long id) {
        threadLocal.set(id);
    }

    public static Long getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

    public static void setCurrentName(String name) {
        threadLocal1.set(name);
    }

    public static String getCurrentName() {
        return threadLocal1.get();
    }

    public static void removeCurrentName() {
        threadLocal1.remove();
    }
}
